package com.lianziyou.chain.common.constants;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class PickaxeConstants {

    //比例基数
    public final static Integer RATIO_BASE = 1000;
    //缎带算力
    public final static List<Integer> RIBBON_HASHRATE = Arrays.asList(0,5,8,15,25,35,50);
    //材质不同等级的算力值
    public final static List<List<Integer>> MATERIALS_LEVEL_HASHRATE = Arrays.asList(
            Arrays.asList(80,81,83,86,90,95,101,112,126,145,173,215,280,390,507,761,1142,1942,3884),
            Arrays.asList(90,91,93,96,100,105,112,124,139,160,191,237,309,430,559,839,1259,2141,4282),
            Arrays.asList(130,132,135,140,146,154,164,181,203,234,279,346,450,626,814,1221,1832,3115,6230),
            Arrays.asList(210,213,218,225,234,246,261,288,323,372,443,550,715,994,1293,1940,2910,4947,9894));

    //等级升级难度比例
    public final static List<Double> LEVEL_UP_DIFF_RATE = new ArrayList<>();
    //材质爆率概率
    public final static List<Double> MATERIALS_DIFF_RATE = new ArrayList<>();
    //缎带爆率概率
    public final static List<Double> RIBBON_DIFF_RATE = new ArrayList<>();
    //幸运值各个阶段爆率难度
    public final static List<Double> LUCK_DIFF_RATE = new ArrayList<>();


/*各个类型概率偏离幅度安全值*/

    //材质安全偏离概率
    public final static List<Double> MATERIALS_DIFF_RATE_DEVIATION = Arrays.asList(0.3, 0.5, 0.8, 1.0);
    //缎带安全偏离概率
    public final static List<Double> RIBBON_DIFF_RATE_DEVIATION = Arrays.asList(0.5, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0);
    //幸运值段 安全偏离概率
    public final static List<Double> LUCK_DIFF_RATE_DEVIATION = Arrays.asList(0.5, 0.6, 0.7, 0.8, 1.0);


    static {
        Arrays.asList(0,1000,1000,1000,1000,1000,1000,2000,1800,1600,1400,800,750,600,550,450,400,350,300).forEach(v -> LEVEL_UP_DIFF_RATE.add((double)v / RATIO_BASE));
        Arrays.asList(590,300,100,10).forEach(v -> MATERIALS_DIFF_RATE.add((double)v / RATIO_BASE));
        Arrays.asList(350,250,200,100,60,30,10).forEach(v -> RIBBON_DIFF_RATE.add((double)v / RATIO_BASE));
        Arrays.asList(400,300,150,100,50).forEach(v -> LUCK_DIFF_RATE.add((double)v / RATIO_BASE));
    }

}
